﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;


namespace EvolSoftWeb
{

    
    public partial class Master : System.Web.UI.MasterPage
    {
        
        
        /// <summary>
        /// Permite ocultar el menu
        /// </summary>
        public bool OcultarMenu
        {
            set 
            {          
                this.asp.Visible = false; 
            }
        }

        /// <summary>
        /// Evento de carga de pagina
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
          
        }

        /// <summary>
        /// Permite ocultar el menu de la aplicacion
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnCollapse_Click(object sender, ImageClickEventArgs e)
        {
            this.asp.Visible = !this.asp.Visible;          
        }


        /// <summary>
        /// Obtiene el identificador unico de un control
        /// </summary>
        /// <param name="ctrl"></param>
        /// <returns></returns>
        protected string ObtenerIdUnico(Control ctrl)
        {
            string sId = ctrl.UniqueID;
            if (sId == null)
            {
                return null;
            }
            if (sId.IndexOf(':') >= 0)
            {
                return sId.Replace(':', '$');
            }
            return sId;
        }

       
    }
}